﻿@model Domain.NetworkService.Description
@using (Html.BeginForm("AddTestNS", "Manage", FormMethod.Post, new { id = "NSForm", @class = "invisible" }))
{
    @Html.Hidden("devName", null, new { value = ViewBag.devName });
    @Html.HiddenFor(m => m.networkTestDescription, new { @Value = Domain.NetworkService.NetworkTestDescription.NS });
    @Html.Label("IP: ");
    @Html.TextBoxFor(m => m.HostNameOrIP, new
{
    type = "text",
    required = "required",
    pattern = @"((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$",
    oninvalid = "this.setCustomValidity('Необходим IP адрес')",
    oninput = "setCustomValidity('')"
});
    @Html.Label(" Timeout: ");
    @Html.TextBoxFor(m => m.Timeout, new
{
    type = "number",
    @Value = "10",
    min = "1",
    max = "3600",
    maxlength = "4",
    oninvalid = "this.setCustomValidity('От 1 до 3600 секунд')",
    oninput = "setCustomValidity('')"
});
    @Html.HiddenFor(m => m.Special, new { @Value = Stub.Absent });            
    <input class="btn" type="submit" value="Добавить" />
}